-- GENERATED SPELL FOR [Priestess of Torment] --


function spell0_25509(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(46270,pUnit)
pUnit:RegisterEvent('Sorts_25509', 8000, 1)
end

function spell1_25509(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(46271,pUnit)
pUnit:RegisterEvent('Sorts_25509', 692, 1)
end

function Sorts_25509(pUnit, Event)
local choix_sorts_25509 = math.random(0, 1)
if choix_sorts_25509 == 0 then
pUnit:RegisterEvent('spell0_25509', 1, 1)
end
if choix_sorts_25509 == 1 then
pUnit:RegisterEvent('spell1_25509', 1, 1)
end
end

function mob25509_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_25509', math.random(1500, 3000), 1)
end

function mob25509_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25509_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25509_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(25509, 1, 'mob25509_Action')
RegisterUnitEvent(25509, 2, 'mob25509_Leave')
RegisterUnitEvent(25509, 3, 'mob25509_Kill')
RegisterUnitEvent(25509, 4, 'mob25509_Die')
